from core.basePage import BasePage
from core.model import ElementModel
from pages.zentao.MainMenuPage import MainMenuPage


class DashboardTagMenu(BasePage, MainMenuPage):
    element_my_index_tag = ElementModel(desc='地盘-仪表盘标签', selector='//a[@href="/index.php?m=my&f=index"]')
    element_my_calender_tag = ElementModel(desc='地盘-仪表盘标签', selector='//a[@href="/index.php?m=my&f=calendar"]')
    element_my_todo_tag = ElementModel(desc='地盘-仪表盘标签', selector='//a[@href="/index.php?m=my&f=calendar"]')
    element_my_task_tag = ElementModel(desc='地盘-待处理', selector='//a[@href="/index.php?m=my&f=work&mode=task"]')
    element_my_audit_tag = ElementModel(desc='地盘-待处理', selector='//a[@href="/index.php?m=my&f=audit&type=all&param=&orderBy=time_desc""]')
    element_my_project_tag = ElementModel(desc='地盘-待处理', selector='//a[@href="/index.php?m=my&f=project"]')
    element_my_execution_tag = ElementModel(desc='地盘-待处理', selector='//a[@href="/index.php?m=my&f=execution&type=undone"]')
    element_my_contribute_tag = ElementModel(desc='地盘-待处理', selector='//a[@href="/index.php?m=my&f=contribute&mode=task"]')
    element_my_dynamic_tag = ElementModel(desc='地盘-待处理', selector='//a[@href="/index.php?m=my&f=dynamic"]')
    element_my_contact_tag = ElementModel(desc='地盘-待处理', selector='//a[@href="/index.php?m=my&f=managecontacts"]')


class DashboardIndexPage(BasePage):
    element_my_index_zentao_dynamic = ElementModel(desc='地盘-仪表盘-禅道动态', selector='//*[@class="panel-title" and text()="禅道动态"]')
    element_my_index_use_help = ElementModel(
        desc='地盘-仪表盘-使用帮助', selector='//*[@class="panel-title" and text()="使用帮助"]'
    )
class DashboardPage(
    DashboardTagMenu,DashboardIndexPage
):
    element_iframe = ElementModel(desc='地盘iframe', selector='//iframe[@id="appIframe-my"]')


    pass

